update test
authorAlex Burka <aburka@seas.upenn.edu>
Fri, 23 Jun 2017 23:30:05 +0000 (19:30 -0400)
committerAlex Burka <aburka@seas.upenn.edu>
Fri, 23 Jun 2017 23:30:05 +0000 (19:30 -0400)
tests/install.rs

index 7a61b716e18a7e46c1f0e54c9ac17712d3d7ae7f..b135922987c4d3bf258e7263c6c486777c9de450 100644 (file)
@@ -55,45 +55,54 @@ warning: be sure to add `[..]` to your PATH to be able to run the installed bina
 }
 
 #[test]
-test!(multiple_pkgs {
+fn multiple_pkgs() {
     pkg("foo", "0.0.1");
     pkg("bar", "0.0.1");
 
     assert_that(cargo_process("install").arg("foo").arg("bar"),
-                execs().with_status(0).with_stdout(&format!("\
-{updating} registry `[..]`
-{downloading} foo v0.0.1 (registry file://[..])
-{compiling} foo v0.0.1 (registry file://[..])
-{installing} {home}[..]bin[..]foo[..]
-{downloading} bar v0.0.1 (registry file://[..])
-{compiling} bar v0.0.1 (registry file://[..])
-{installing} {home}[..]bin[..]bar[..]
+                execs().with_status(0).with_stderr(&format!("\
+[UPDATING] registry `[..]`
+[DOWNLOADING] foo v0.0.1 (registry file://[..])
+[INSTALLING] foo v0.0.1
+[COMPILING] foo v0.0.1
+[FINISHED] release [optimized] target(s) in [..]
+[INSTALLING] {home}[..]bin[..]foo[..]
+warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
+[DOWNLOADING] bar v0.0.1 (registry file://[..])
+[INSTALLING] bar v0.0.1
+[COMPILING] bar v0.0.1
+[FINISHED] release [optimized] target(s) in [..]
+[INSTALLING] {home}[..]bin[..]bar[..]
+warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
+
+
+SUMMARY
+
+Successfully installed: foo, bar
+
+Errors:
+<tab>
 ",
-        updating = UPDATING,
-        downloading = DOWNLOADING,
-        compiling = COMPILING,
-        installing = INSTALLING,
         home = cargo_home().display())));
     assert_that(cargo_home(), has_installed_exe("foo"));
     assert_that(cargo_home(), has_installed_exe("bar"));
 
     assert_that(cargo_process("uninstall").arg("foo"),
-                execs().with_status(0).with_stdout(&format!("\
-{removing} {home}[..]bin[..]foo[..]
+                execs().with_status(0).with_stderr(&format!("\
+[REMOVING] {home}[..]bin[..]foo[..]
 ",
-        removing = REMOVING,
         home = cargo_home().display())));
     assert_that(cargo_process("uninstall").arg("bar"),
-                execs().with_status(0).with_stdout(&format!("\
-{removing} {home}[..]bin[..]bar[..]
+                execs().with_status(0).with_stderr(&format!("\
+[REMOVING] {home}[..]bin[..]bar[..]
 ",
-        removing = REMOVING,
         home = cargo_home().display())));
     assert_that(cargo_home(), is_not(has_installed_exe("foo")));
     assert_that(cargo_home(), is_not(has_installed_exe("bar")));
-});
+}
 
-test!(pick_max_version {
+#[test]
+fn pick_max_version() {
     pkg("foo", "0.0.1");
     pkg("foo", "0.0.2");